<!-- 添加患者 -->
<template>
    <div class='bgff h100 pd pt10 case-context pr'>
        <p class="title-label">新增案例</p>

        <div class="context-page-case mt20 " v-if="jhhbsew">
            <n-form ref="formRef" :model="form" :rules="rules" label-width="120" :inline="false" size="normal"
                label-placement="left">
                <n-grid :cols="24" :x-gap="20" :y-gap="20">
                    <n-form-item-gi span="8" label="姓名:" path="title">
                        <n-input v-model:value="form.name" type="text" placeholder="请输入标题" size="medium"
                            clearable></n-input>
                    </n-form-item-gi>
                    <n-form-item-gi label="性别:" path="title" span="5">
                        <n-radio-group v-model:value="form.sex" name="radiogroup">
                            <n-space>
                                <n-radio v-for="song in sexList" :key="song.value" :value="song.value">
                                    {{ song.label }}
                                </n-radio>
                            </n-space>
                        </n-radio-group>
                    </n-form-item-gi>
                    <n-form-item-gi label="病种:" path="title" span="11">
                        <n-select v-model:value="form.entity" size="medium" :options="bzhonhg" clearable />
                    </n-form-item-gi>
                    <n-form-item-gi label="主治医生:" path="title" span="8">
                        <n-select v-model:value="form.attendingDoctor" size="medium" :options="zzys" clearable />
                    </n-form-item-gi>
                 
                    <n-form-item-gi :span="12" label="Datetime" path="datetimeValue">
                        {{ formattedValue }}
        <n-date-picker v-model="formattedValue" type="datetime" />
      </n-form-item-gi>

                </n-grid>
           
            </n-form>
        </div>
 

    </div>
</template>
<script lang='ts' setup>
import { ref } from "vue"
const jhhbsew = ref(false)
const formattedValue =  null
const form = ref({
    name: "",
    sex: 1,
    entity: "",
    attendingDoctor: "",
    DateOfArrival: new Date().getTime(),
    TakingTime: "",
    drugUsage: "",
    PatientSource: "",
    ReturnVisitInformation: ""
})
const sexList = [{ label: "男", value: 1 }, { label: "女", value: 2 }]
const bzhonhg = [{ label: "病种1", value: 1 }, { label: "病种2", value: 2 }]
const zzys = [{ label: "主治医生1", value: 1 }, { label: "主治医生2", value: 2 }]
const rules = {
    name: {
        required: true,
        message: '请输入标题',
        trigger: 'blur'
    },
}
setTimeout(() => {
    jhhbsew.value = true
}, 2000);
</script>
<style scoped>
.context-page-case {
    width: 1200px;
}
</style>
<style>
.n-radio .n-radio__dot {
    width: 16px;
    height: 16px;
}
</style>